The main() function
main() declares the start of the function, while the two curly brackets show the start and finish of the function. Curly brackets in C are used to group statements together as in a function, or in the body of a loop. Such a grouping is known as a compound statement or a block.
main()  ó  program
In Pascal a program is a single unit, called program, which contains variables, functions, and procedures nested within. In C++, no such nesting occurs, and the main function is the equivalent of the program. The type of the value returned by a function is written before the function name, and there is no special function keyword. The parentheses () signify a function declaration to the compiler. They are present even if the function has no arguments (as in main()). C++ does not distinguish between functions and procedures. A procedure is simply a function returning void. The braces {} are the equivalent of begin and end. In C++ all statements are terminated with a semicolon, even the last statement of a block, but there is no semicolon following the closing brace. The operation cout << is like the Pascal write; there is no special writeln analog. To obtain a blank line, simply send a string containing a newline ‘\n’.
Many Pascal compilers have an analog to the #include directive that opens another file and includes its contents for compilation. Sometimes this is implemented as a pseudocomment directive (*$I filename*).